/* BUTTONS */

.ui-button {
  display: inline-block;
  position: relative;
  
  border: 1px solid transparent;
  margin: 0;
  padding: 0;
  height: 24px;
  max-height: 24px;
  line-height: 24px;
  background-repeat: repeat-x;
  background-position: 0 -1px;
  
  cursor: default;
  
  -moz-user-select: none;
  -webkit-user-select: none;
  
  /* Fixes extra padding issue in IE 6-7 */
  width: auto;
  overflow: visible;
}

/* One icon, no text */
.ui-button-icon-only {
  width: 24px;
}

/* Two icons, no text */
.ui-button-icons-only {
  width: 42px;
}

a.ui-button {
  text-decoration: none;
}

input.ui-button {
  padding: 0 10px;
}

.ui-button.ui-corner-all {
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
}

.ui-button.ui-corner-left {
  -webkit-border-top-left-radius: 5px;
  -moz-border-radius-topleft: 5px;
  -webkit-border-bottom-left-radius: 5px;
  -moz-border-radius-bottomleft: 5px;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}

.ui-button.ui-corner-right {
  -webkit-border-top-right-radius: 5px;
  -moz-border-radius-topright: 5px;
  -webkit-border-bottom-right-radius: 5px;
  -moz-border-radius-bottomright: 5px;  
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}


  /* default state */
  .ui-button.ui-state-default {
    border-color: #aaafac;
    background-color: #eee;
    background-image: url(images/button-default-middle.png);
    color: #000;
  }

  /* hover state */
  .ui-button.ui-state-hover {
    background-image: url(images/button-hover-middle.png);
  }
  
  /* active state */
  .ui-button.ui-state-active {
    color: #fff;
    text-shadow: #000 0 0 2px;
    border-color: #000;
    background-image: url(images/button-active-default-middle.png);
  }
  
    .ui-button.ui-state-active.ui-state-hover {
      background-image: url(images/button-active-hover-middle.png);    
    }

  
  /* priority: primary */
  .ui-button.ui-priority-primary {
    color: #fff;
    text-shadow: #000 0 0 2px;
    border-color: #406f39;
    background-image: url(images/button-primary-default-middle.png);
  }
  
    .ui-button.ui-priority-primary.ui-state-hover {
      background-image: url(images/button-primary-hover-middle.png);    
    }
  
    
  /* down state */
  .ui-button.ui-state-down {
    border-color: #363636;
    background-image: url(images/button-down-middle.png);
  }
  
    .ui-button.ui-priority-primary.ui-state-down {
      background-image: url(images/button-primary-down-middle.png);
    }
    
    .ui-button.ui-state-active.ui-state-down {
      background-image: url(images/button-active-down-middle.png);
    }
  
  /* disabled state */
  .ui-button.ui-state-disabled,
  .ui-button.ui-state-disabled:active {
    color: #999;
    border-color: #d0d1d3;
    outline: none !important;
    -moz-outline: 0 !important;
  }
  
  /* focus state */  
  .ui-button.ui-state-focus,
  .ui-button:active,
  .ui-button:focus {
    outline: auto 5px #bce16b;
    outline-offset: -2px;
    -moz-box-shadow: 0 0 2px 2px #bce16b; 
  }
  

/* Button Text */

.ui-button-text {
  font-family: 'Lucida Sans', 'Lucida Grande', Verdana, sans-serif;
  display: block;
  line-height: 1.4;
  padding: 3px 10px;
}

  .ui-button-text-only .ui-button-text {
    padding: 3px 10px;
  }
  
  .ui-button-icon-only .ui-button-text,
  .ui-button-icons-only .ui-button-text {
    text-indent: -9999999px;
  }
  
  .ui-button-text-icon .ui-button-text,
  .ui-button-text-icons .ui-button-text {
    padding-left: 25px;
  }
  
  .ui-button-text-icons .ui-button-text {
    padding-right: 25px;
  }
  
label.ui-button .ui-button-text,
a.ui-button .ui-button-text {
  padding: 5px 10px 1px;
}

  label.ui-button-text-icon .ui-button-text,
  label.ui-button-text-icons .ui-button-text,
  a.ui-button-text-icon .ui-button-text,
  a.ui-button-text-icons .ui-button-text {
    padding-left: 25px;
  }
  
  label.ui-button-text-icons .ui-button-text,
  a.ui-button-text-icons .ui-button-text {
    padding-right: 25px;
  }
  

/* Button Icons */

.ui-button-icon-only .ui-icon,
.ui-button-text-icon .ui-icon,
.ui-button-text-icons .ui-icon,
.ui-button-icons-only .ui-icon {
  position: absolute;
  top: 50%;
  margin-top: -8px;
}

  .ui-button-icon-only .ui-icon {
    left: 50%;
    margin-left: -8px;
  }
  
  .ui-button-text-icon .ui-button-icon-primary,
  .ui-button-text-icons .ui-button-icon-primary,
  .ui-button-icons-only .ui-button-icon-primary {
    left: 5px;
  }

  .ui-button-text-icons .ui-button-icon-secondary,
  .ui-button-icons-only .ui-button-icon-secondary {
    right: 5px;
  }
  


/* Button Set */

.ui-buttonset {
  
}

  .ui-buttonset .ui-button {
    
  }
  

/* 
 * Not wild about this, but using it until I figure out a browser 
 * targeting strategy.
 */
 
* html .ui-button {
  padding: 0 10px;
  height: 22px;
}

@-moz-document url-prefix() {
  
  input[type="text"]:focus,
  input[type="text"]:active {
    -moz-outline: 0px solid #000 !important;
  }

  .ui-button:focus::-moz-focus-inner {
    border-color: transparent !important;
  }
  
  /* fixing evil default firefox padding */
  .ui-button::-moz-focus-inner  {  
    padding: 0 !important;
    border-color: transparent !important;
  }
  
  button.ui-button,
  input.ui-button {
    height: 25px;
    max-height: 25px;
  }

  input.ui-button {
    padding: 0 10px 2px;
  }
  
  
  .ui-button-icon-only .ui-icon,
  .ui-button-text-icon .ui-icon,
  .ui-button-text-icons .ui-icon,
  .ui-button-icons-only .ui-icon {
    position: absolute;
    top: 50%;
    margin-top: -8px;
  }
  
  button.ui-button-icon-only .ui-icon,
  button.ui-button-text-icon .ui-icon,
  button.ui-button-text-icons .ui-icon,
  button.ui-button-icons-only .ui-icon {
    position: absolute;
    top: 50%;
    margin-top: -8px;
  }

    button.ui-button-icon-only .ui-icon {
      left: 50%;
      margin-left: -9px;
    }
    
  button.ui-button-text-icon .ui-button-icon-primary,
  button.ui-button-text-icons .ui-button-icon-primary,
  button.ui-button-icons-only .ui-button-icon-primary {
    left: 2px;
  }

  button.ui-button-text-icons .ui-button-icon-secondary,
  button.ui-button-icons-only .ui-button-icon-secondary {
    right: 5px;
  }
  
  .ui-button .ui-button-text {
    padding: 2px 10px 4px;
  }
  
  .ui-button-text-icon .ui-button-text,
  .ui-button-text-icons .ui-button-text {
    padding-left: 20px;
  }
  
  .ui-button-text-icons .ui-button-text {
    padding-right: 20px;
  }
  
  label.ui-button .ui-button-text,
  a.ui-button .ui-button-text {
    padding: 4px 10px 3px;
  }
  
  label.ui-button-text-icon .ui-button-text,
  label.ui-button-text-icons .ui-button-text,
  a.ui-button-text-icon .ui-button-text,
  a.ui-button-text-icons .ui-button-text {
    padding-left: 25px;
  }
  
  label.ui-button-text-icons .ui-button-text,
  a.ui-button-text-icons .ui-button-text {
    padding-right: 25px;
  }
  
  /*
  .ui-button {
    padding: 3px 10px 7px;
  }
  a.ui-button {
    padding: 3px 10px 5px;
  }
  */
}
